<%--
  Created by IntelliJ IDEA.
  User: WJ
  Date: 2017/12/12
  Time: 15:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<html>
<head>
    <title>Attendance Result</title>
    <script src="js/jquery-3.2.1.min.js"></script>
</head>
<body>
    <h2>群信息录入成功</h2>
    <button id="findAllGroup">查询所有群信息</button>
    <table id="GroupAll" border="1"cellspacing="0" class="gridtable">

    </table>
</body>
<script>
    var temp ='<tr>\
                 <th class="width10">群名称</th>\
                <th class="width10">hookUrl</th>\
              </tr>';
    $("#findAllGroup").click(function(){
        $.ajax({
            url:"findAllGroup",
            success:function(message){
                $("#GroupAll").html('');
                $("#GroupAll").append(temp);
                for(var i=0;i<message.length;i++){
                    var messageObj = message[i];
                    var tr = $("<tr><td>"+messageObj.group_name+"</td><td>"+messageObj.hock_url+"</td></tr>");
                    $("#GroupAll").append(tr);
                }
            }
        });
    });
</script>
</html>
